/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package escom.ipn.modelo.facade;

import escom.ipn.modelo.dao.adminPoliciaDAO;
import escom.ipn.modelo.dto.PoliciaClass;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

/**
 *
 * @author db2admin
 */
public class adminPoliciaFacade {
    private Connection cnn;
    private adminPoliciaDAO dao;

    public adminPoliciaFacade(Connection cnn) {
        this.cnn=cnn;
        dao= new adminPoliciaDAO();
    }  
    public void guardarPolicia(PoliciaClass a)
            throws SQLException{
         dao.insertPolicia(a, cnn);
    } 
    
    public void update(PoliciaClass a)
            throws SQLException{
         dao.updatePolicia(a, cnn);
    }

    public List mostrarTodos()
            throws SQLException{
         return dao.loadAll(cnn);
    }

    public void borrarPolicia(PoliciaClass a) throws SQLException{
          dao.borrarPolicia(a,cnn);
    }

    public List loadSelect(PoliciaClass a) throws SQLException{
        return dao.loadSelect(a,cnn);
    }
    
    public List loadSelectSector(PoliciaClass a) throws SQLException{
        return dao.loadSelectSector(a,cnn);
    }
    
    

}

